﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.stack_daily_water_info>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	水位及水质（每日）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul>
                <li><a href="javascript:return(false);" class="current"><span>水位及水质</span></a></li>
                <li><a href="/Record/BackWater/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>进浆及回水</span></a></li>
                <li><a href="/Record/Settle/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>沉降及位移观测</span></a></li>
                <li><a href="/Record/Ardealite/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>磷石膏堆积坝</span></a></li>
                <li><a href="/Record/Ditch/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>截洪沟</span></a></li>
                <li><a href="/Record/PiezometerWell/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>测压井</span></a></li>
                <li><a href="/Record/PiezometerBase/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>测压仪</span></a></li>
                <li><a href="/Record/Drain/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>

    <%
           bool result = (bool)ViewData["success"];
           if(result){ 
        %>
           <div style="margin-top:20px;font-weight:bold;color:blue;text-align:center">水位及水质更新成功</div>
        <%
        }
        %>

    <% using (Html.BeginForm())
    {%>
        <%= Html.ValidationSummary(true) %>
        <%= Html.HiddenFor(model => model.stack_id) %>
        <%= Html.HiddenFor(model => model.date) %>
        <%= Html.Hidden("factoryId", ViewData["factoryId"]) %>
            
    <table class="tableCss" cellspacing="0" cellpadding="0" align="center" border="0" style="margin-top:10px">
        <tr>
            <th colspan="6" class="heightrow" align="center" style="text-align:center">
                水位及水质（每日）
            </th>
        </tr>
        <tr>
            <td class="row1" align="left" style="padding-top:10px;padding-left:30px">测量人员：</td>
            <td class="row1" align="left" colspan="5">
                <%= Html.DropDownList("tester_id", ViewData["users"] as List<SelectListItem>, "请选择", new { style = "width:150px" })%>
                <%= Html.ValidationMessageFor(model => model.tester_id)%>
            </td>
        </tr>
        <tr>
            <td class="row1" align="left" colspan="6" style="padding-top:10px;padding-left:30px">库区环境:</td>
        </tr>
        <tr>
            <td class="row1" align="right" width="120px">堆场一区水位:</td>
            <td class="row1" align="left"  width="60px">
                <%= Html.TextBoxFor(model => model.partition1_water_level)%> m
                <%= Html.ValidationMessageFor(model => model.partition1_water_level)%>
            </td>
            <td class="row1" align="right" width="60px">PH值:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.partition1_water_ph)%>
                <%= Html.ValidationMessageFor(model => model.partition1_water_ph)%>
            </td>
            <td class="row1" align="right" width="60px">堆场一区水量:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.partition1_water_capacity)%>m<sup>3</sup>
                <%= Html.ValidationMessageFor(model => model.partition1_water_capacity)%>
            </td>
        </tr>
        <tr>
            <td class="row1" align="right">堆场二区水位:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.partition2_water_level)%> m
                <%= Html.ValidationMessageFor(model => model.partition2_water_level)%>
            </td>
            <td class="row1" align="right">PH值:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.partition2_water_ph)%>
                <%= Html.ValidationMessageFor(model => model.partition2_water_ph)%>
            </td>
            
            <td class="row1" align="right" width="60px">堆场二区水量:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.partition2_water_capacity)%>m<sup>3</sup>
                <%= Html.ValidationMessageFor(model => model.partition2_water_capacity)%>
            </td>
        </tr>
<%
    stack_pool_daily_water_info[] poolWaterInfos = (stack_pool_daily_water_info[])ViewData["poolWaterInfos"];
    for (int i = 0; i < poolWaterInfos.Length; i++)
    {
%>
        <tr>
            <td class="row1" align="right"><%=(i+1) %>号调节水池水位:</td>
            <td class="row1" align="left">
                <%= Html.TextBox("pool_water_level" + (i + 1), poolWaterInfos[i].pool_water_level)%> m
                <%= Html.ValidationMessage("pool_water_level" + (i + 1))%>
            </td>
            <td class="row1" align="right">PH值:</td>
            <td class="row1" align="left">
                <%= Html.TextBox("pool_water_ph" + (i + 1), poolWaterInfos[i].pool_water_ph)%>
                <%= Html.ValidationMessage("pool_water_ph" + (i + 1))%>
            </td>
            <td class="row1" align="right">调节水池水量:</td>
            <td class="row1" align="left">
                <%= Html.TextBox("pool_water_capacity" + (i + 1), poolWaterInfos[i].pool_water_capacity)%>m<sup>3</sup>
                <%= Html.ValidationMessage("pool_water_capacity" + (i + 1))%>
            </td>
        </tr>
<%
    } 
%>
        <tr>
            <td class="row1" align="left" colspan="6" style="padding-top:20px;padding-left:30px">周边环境:<%=Html.Hidden("poolNum", poolWaterInfos.Length)%></td>
        </tr>
        <tr>
            <td class="row1" align="right">上游河流水位:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.upstream_water_level)%> m
                <%= Html.ValidationMessageFor(model => model.upstream_water_level)%>
            </td>
            <td class="row1" align="right">PH值:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.upstream_water_ph)%>
                <%= Html.ValidationMessageFor(model => model.upstream_water_ph)%>
            </td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>
        <tr>
            <td class="row1" align="right" style="color:#0000ff">总磷含量:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.total_up_phosphorus)%> <span style="color:#0000ff">ppm（每周一次）</span>
                <%= Html.ValidationMessageFor(model => model.total_up_phosphorus)%>
            </td>
            <td class="row1" align="right" style="color:#0000ff">总氟含量:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.total_up_fluorin)%> 
                <%= Html.ValidationMessageFor(model => model.total_up_fluorin)%>
                <span  style="color:#0000ff">ppm（每周一次）</span>
            </td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>
        
        <tr>
            <td class="row1" align="right" style="color:#0000ff">氨氮含量:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.total_up_ammonia)%> <span style="color:#0000ff">ppm（每周一次）</span>
                <%= Html.ValidationMessageFor(model => model.total_up_ammonia)%>
            </td>
            <td class="row1" align="right" style="color:#0000ff">&nbsp;</td>
            <td class="row1" align="left">&nbsp;</td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>
        <tr>
            <td class="row1" align="right">下游河流水位:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.downstream_water_level)%> m
                <%= Html.ValidationMessageFor(model => model.downstream_water_level)%>
            </td>
            <td class="row1" align="right">PH值:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.downstream_water_ph)%>
                <%= Html.ValidationMessageFor(model => model.downstream_water_ph)%>
            </td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>
        <tr>
            <td class="row1" align="right" style="color:#0000ff">总磷含量:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.total_down_phosphorus)%> <span style="color:#0000ff">ppm（每周一次）</span>
                <%= Html.ValidationMessageFor(model => model.total_down_phosphorus)%>
            </td>
            <td class="row1" align="right" style="color:#0000ff">总氟含量:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.total_down_fluorin)%> 
                <%= Html.ValidationMessageFor(model => model.total_down_fluorin)%>
                <span  style="color:#0000ff">ppm（每周一次）</span>
            </td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>
        
        <tr>
            <td class="row1" align="right" style="color:#0000ff">氨氮含量:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.total_down_ammonia)%> <span style="color:#0000ff">ppm（每周一次）</span>
                <%= Html.ValidationMessageFor(model => model.total_down_ammonia)%>
            </td>
            <td class="row1" align="right" style="color:#0000ff">&nbsp;</td>
            <td class="row1" align="left">&nbsp;</td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>
        <tr>
            <td class="row1" align="right">库尾集水池水位:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.tail_pool_water_level)%> m
                <%= Html.ValidationMessageFor(model => model.tail_pool_water_level)%>
            </td>
            <td class="row1" align="right" style="color:#0000ff">&nbsp</td>
            <td class="row1" align="left">
                &nbsp;
            </td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>

        <tr>
            <td class="row1" align="left" colspan="6" style="padding-top:20px;padding-left:30px">集水井:</td>
        </tr>
        <tr>
            <td class="row1" align="right">集水井水位:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.catchpit_water_level)%> m
                <%= Html.ValidationMessageFor(model => model.catchpit_water_level)%>
            </td>
            <td class="row1" align="right">PH值:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.catchpit_water_ph)%>
                <%= Html.ValidationMessageFor(model => model.catchpit_water_ph)%>
            </td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>
        <tr>
            <td class="row1" align="right">抽水量:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.pumpage)%> m<sup>3</sup>/hr
                <%= Html.ValidationMessageFor(model => model.pumpage)%>
            </td>
            <td class="row1" align="right">持续时间:</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.pump_time)%> 
                <%= Html.ValidationMessageFor(model => model.pump_time)%> 
                hr
            </td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>
        <tr>
            <td class="row1" align="left" colspan="4" style="padding-top:20px;padding-left:30px">
                <div>膜底导渗系统：</div>
                <table cellspacing="0" cellpadding="0"  style="margin-top:5px;text-align:center;border-style:solid;border-color:Black" border="1">
                    <tr>
                        <td class="row1">&nbsp;</td>
                        <td>流量</td>
                        <td>PH值</td>
                        <td>水流状况</td>
                        <td>描述</td>
                    </tr>
                    <tr>
                        <td>导渗管A</td>
                        <td>
                            <select name="tube_a_flow">
                                <option value="1" <%if (Model.tube_a_flow == 1){ %>selected<%} %>>满管</option>
                                <option value="0.5" <%if (Model.tube_a_flow == 0.5){ %>selected<%} %>>半管</option>
                                <option value="0.25" <%if (Model.tube_a_flow == 0.25){ %>selected<%} %>>1/4管</option>
                                <option value="0" <%if (Model.tube_a_flow == 0){ %>selected<%} %>>断流</option>
                            </select> </td>
                        <td><%= Html.TextBoxFor(model => model.tube_a_ph)%><%= Html.ValidationMessageFor(model => model.tube_a_ph)%>  </td>
                        <td>
                            <select name="tube_a_quality">
                                 <option value="1" <%if (Model.tube_a_quality == 1){ %>selected<%} %>>清澈</option>
                                 <option value="2" <%if (Model.tube_a_quality == 2){ %>selected<%} %>>含土颗粒</option>
                                 <option value="3" <%if (Model.tube_a_quality == 3){ %>selected<%} %>>浑浊</option>
                            </select>
                        </td>
                        <td>库区渗水</td>
                    </tr>
                    <tr>
                        <td>导渗管B</td>
                        <td>
                            <select name="tube_b_flow">
                                <option value="1" <%if (Model.tube_b_flow == 1){ %>selected<%} %>>满管</option>
                                <option value="0.5" <%if (Model.tube_b_flow == 0.5){ %>selected<%} %>>半管</option>
                                <option value="0.25" <%if (Model.tube_b_flow == 0.25){ %>selected<%} %>>1/4管</option>
                                <option value="0" <%if (Model.tube_b_flow == 0){ %>selected<%} %>>断流</option>
                            </select> </td>
                        <td><%= Html.TextBoxFor(model => model.tube_b_ph)%><%= Html.ValidationMessageFor(model => model.tube_b_ph)%>  </td>
                        <td>
                            <select name="tube_b_quality">
                                 <option value="1" <%if (Model.tube_b_quality == 1){ %>selected<%} %>>清澈</option>
                                 <option value="2" <%if (Model.tube_b_quality == 2){ %>selected<%} %>>颜色不正常</option>
                                 <option value="3" <%if (Model.tube_b_quality == 3){ %>selected<%} %>>浑浊</option>
                            </select>
                        </td>
                        <td>库尾渗水</td>
                    </tr>
                    <tr>
                        <td>导渗管C</td>
                        <td>
                            <select name="tube_c_flow">
                                <option value="1" <%if (Model.tube_c_flow == 1){ %>selected<%} %>>满管</option>
                                <option value="0.5" <%if (Model.tube_c_flow == 0.5){ %>selected<%} %>>半管</option>
                                <option value="0.25" <%if (Model.tube_c_flow == 0.25){ %>selected<%} %>>1/4管</option>
                                <option value="0" <%if (Model.tube_c_flow == 0){ %>selected<%} %>>断流</option>
                            </select> </td>
                        <td><%= Html.TextBoxFor(model => model.tube_c_ph)%><%= Html.ValidationMessageFor(model => model.tube_c_ph)%>  </td>
                        <td>
                            <select name="tube_c_quality">
                                 <option value="1" <%if (Model.tube_c_quality == 1){ %>selected<%} %>>清澈</option>
                                 <option value="2" <%if (Model.tube_c_quality == 2){ %>selected<%} %>>颜色不正常</option>
                                 <option value="3" <%if (Model.tube_c_quality == 3){ %>selected<%} %>>浑浊</option>
                            </select>
                        </td>
                        <td>库区渗水</td>
                    </tr>
                </table>

                <div style="margin-top:20px">当日情况补充：</div>
                <div style="margin-top:5px"><%=Html.TextAreaFor(model => model.descriptoin, new { cols="80", rows="10"})%></div>
            </td>
            <td class="row1">&nbsp;</td>
            <td class="row1">&nbsp;</td>
        </tr>
    </table>
    <div style="margin-top:25px;text-align:center">
        <input type="submit" value="提    交" style="font-size:16px;font-weight:bold" />
    </div>
    <% } %>
</asp:Content>
